﻿using BBCore.Core.Models.Samples;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BBCore.Application.Samples
{
    public interface IMasterDetailService
    {
        /// <summary>
        /// 级联保存head和body表的数据
        /// </summary>
        void CascadeInsertSave(ZDL_HYJ_MASTER_HEAD items, out int kingno);
        /// <summary>
        /// 批量编辑删除保存head和body表的数据,Freesql扩展AggregateRootRepository
        /// </summary>
        /// <param name="items">ZDL_HYJ_MASTER_HEAD对象</param>
        /// <param name="kingno">流水号</param>
        void CascadeUpdateSave(ZDL_HYJ_MASTER_HEAD items, int kingno);
        /// <summary>
        /// 根据流水号级联查询Head表和Body表的数据
        /// </summary>
        /// <param name="kingno">流水号</param>
        /// <returns></returns>
        ZDL_HYJ_MASTER_HEAD? GetZDL_BKC(int kingno);
        /// <summary>
        /// 通过模板导进去的数据与数据库MSI表相连,把描述和类型带出来,再返回List<T>对象
        /// </summary>
        /// <param name="importBodyDetail">通过模板导进去的数据 搜索内存数据嵌套</param>
        /// <returns>返回List<ZDL_HYJ_DETAIL_BODY>对象</returns>

        List<ZDL_HYJ_DETAIL_BODY>? GetZDL_BKC_BODY_DETAIL(ICollection<ZDL_HYJ_DETAIL_BODY> importBodyDetail);

    }
}
